<?php
defined('IN_ADMIN') or exit('No permission resources.');
foreach ($menu_left as $value) {
	echo " <p class=\"menu_title\"><img src=\"images/menu_ico.gif\"/> ".$value['name']."</p>";
	$menu_left_children = CAdmin::admin_menu($value['menu_id']);
	echo "<ul class=\"menu_menus\">";
	foreach ($menu_left_children as $_value) {		
		echo '<li id="_MP'.$_value['menu_id'].'"><a href="javascript:_MP('.$_value['menu_id'].',\'?m='.$_value['m'].'&c='.$_value['c'].'&a='.$_value['a'].'\')"  style="display: block;">'.$_value['name'].'</a></li>';
	}
	echo "</ul>";
}
?>
<script type="text/javascript">
$('.menu_menus li').each(function(){
	
	$(this).bind('mouseover',function(){
	if($(this).attr('class') != 'selected'){
		$(this).attr('class','over');
		}
	});		
	$(this).bind('mouseout',function(){
		if($(this).attr('class') != 'selected'){
		$(this).attr('class','');
		}
	});	
});
//菜单伸缩
$('.menu_title').click(function(){
	$(this).next('.menu_menus').slideToggle(100);	
	if($(this).attr('class') == 'menu_title'){
		$(this).attr('class','menu_menu');
	}else{
		$(this).attr('class','menu_title');
	} 	
});
</script>